-
-
Notifications
You must be signed in to change notification settings - Fork 348
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Update MSYS2 Windows 32 and 64 bit toolchain and build scripts #4314
base: main
Are you sure you want to change the base?
Conversation
Usually not running the latest version of aqt as this is a newer option. The new build script does not specify a version. |
@offer-shmuely If you haven't done so: the new install scripts will not work on an existing MSYS2 installation. You need to deinstall MSYS2 entirely an re-install MSYS2 using the new install guide and scripts. |
Not familiar with MSYS |
oops, idk if Neil already update the how-to. but it's similar to the current one. deinstall MSYS2 and try the new scripts |
Is this ready to go or was more work needed? |
tools/msys2_build_32_64.sh
Outdated
Build Simulator: $(bool_to_text ${BUILD_SIMULATOR}) | ||
Pause after each step: $(bool_to_text ${STEP_PAUSE}) | ||
" | ||
read -p "Press any key to continue or ctrl+C to abort" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only Enter works, thus "Press Enter key to continue or Ctrl+C to abort".
Edit the file <MSYS2 install directory>\mingw64.ini eg C:\msys64\mingw64.ini | ||
- Uncomment the line #MSYS2_PATH_TYPE=inherit | ||
- Save the file | ||
" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO better, than setting an operating system wide setting for EdgeTX, would be to explicitly use -DARM_TOOLCHAIN_DIR
in EdgeTX CMake line, e.g. here then with ARM GNU 11.3.1 -DARM_TOOLCHAIN_DIR="C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\11.3 rel1\bin"
.
Setting something system wide might affect users building other (non EdgeTX) code on their systems.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently this does not work anyway as there are spaces in the path.
Let's just say there was robust discussion when I posted these new scripts about how best to pass the ARM path.
I too prefer the -D method.
Tested this PR under Win11 Pro 23H2 64-bit. With the comments and changes I posted above and below this post, all worked (was able to build radio firmware, Companion, Simulator binary and library and create an installer executable). This PR should remove After my comments are worked in, I see no issue merging this PR into main. I would also update the Wiki page https://github.com/EdgeTX/edgetx/wiki/Build-Instructions-under-Windows-10-%28MSYS2%29 accordingly, e.g. to also update the CMAKE_PREFIX_PATH to $HOME/qt/5.15.2/mingw81_64. For someone wanting to test, here the full working CMake line for RM Zorro: cmake -G "MSYS Makefiles" -Wno-dev -DCMAKE_PREFIX_PATH=$HOME/qt/5.15.2/mingw81_64 -DSDL2_LIBRARY_PATH=/mingw64/bin/ -DPCB=X7 -DPCBREV=ZORRO -DDEFAULT_MODE=2 -DLUA_MIXER=YES -DARM_TOOLCHAIN_DIR="C:\Program Files (x86)\Arm GNU Toolchain arm-none-eabi\11.3 rel1\bin" -DCMAKE_BUILD_TYPE=Release ../ |
This PR was built well before the infamous ADC refactor was released (which keeps on giving). Also Peter has needed to do some tricks to keep the compilations working with updates to the MSYS packages. So it does need revisiting. |
The ADC refactor broke Companion compile as the hw def json files are not where CMake expects. Companion compiles, it just does not have any definitions to load for the radio profiles. So a fix required. |
Really need to make the |
That's the direction I am going. I take that approach in my Linux dev environment. |
ae39924
to
29b183e
Compare
@pfeerick @rotorman okay so the scripts are working but I need to do more use cases tests before recommending merging. |
Were there any changes/updates to this since May? I wanted to setup a Windows dev environment to play around a bit with EdgeTX code and it's been a struggle. I tried on two different Windows 11 (both 23H2) with what's currently available for download from www.msys2.org (msys2-x86_64-20240727) without success... On the first machine, there were some random errors/warnings during "stage 2" script - but it was able to compile firmware but not companion, libsimulator or simulator (all targets reported as not present in the Makefile). On the second machine things looked better (but turned out worse) as I didn't notice and errors or warnings during "stage 2" but... All targets (including firmware) were missing from the Makefile (I did run 'make configure')... Just checking if there are updated "recipes" out there? I was able to deploy a working dev environment by following https://github.com/EdgeTX/edgetx/wiki/Build-Instructions-under-Ubuntu-20.04 "recipe" (but only when I switched to 22.04 from 20.04!?) and, I should say, with VS.Code's "remote connection" feature directly into WSL's VM (and built in graphics support) - it's really a nice and comfy dev environment and a refreshing departure for a lifelong C/C++ guy coddled by IDE-hand-holding - takes me back to the university days (and that's going some ways back lol)... But I'd really prefer to build Windows binaries (it just seems easier seeing as I have all Windows machines) so I've been banging my head against the wall for the past few days... Thx!! |
Since v2.10 you do need to compile the libsimulator before Companion and Simulator. |
Thanks for the reply... I am not able to build libsimulator either - it seems that none of the targets are generated in the makefile (I get the message "*** No rule to make target 'libsimulator'. Stop."... It seems that Qt either wasn't (fully) installed or was installed but somewhere were the CMake cannot find it... But... I suppose this probably isn't the right forum for these kinds of questions (and cries for help ;-)) - my apologies... |
fb56dc4
to
476fba5
Compare
Now supports v2.10 hwdefs and uses repo supported radios and libsims |
@pfeerick I have finished my testing and tinkering so now just bug fixes anyone else finds |
83e2a80
to
3d63345
Compare
Just ran this on a squeaky new install of MSYS2... Stage 1 ran perfectly. Stage 2 has hit a snag with the python 3.11+ "externally managed environment" changes... i.e.
Adding This unfortunately only seems to work until you hit the How is msys2_build intended to be used? As I'm hitting "unsupported radio simulator" when I try something like |
Summary of changes:
Todo: